<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('发起支付申请')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-payment-edit" th:object="${sysFnPayment}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付单号：</label>
                <div class="col-sm-8">
                    <input name="paymentNo" th:field="*{paymentNo}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">订单金额：</label>
                <div class="col-sm-8">
                    <input name="orderPrice" th:field="*{orderPrice}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">支付标题：</label>
                <div class="col-sm-8">
                    <input name="paymentTitle" th:field="*{paymentTitle}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">订单类型：</label>
                <div class="col-sm-5">
                    <input class="form-control" name="relateNoType" th:value="${@dict.getLabel('sys_order_type',sysFnPayment.relateNoType)}" readonly />
                </div>
                <div class="col-sm-4">
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 支付单关联的单号</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">订单单号：</label>
                <div class="col-sm-8">
                    <input name="relateNo" th:field="*{relateNo}" class="form-control" type="text" readonly>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">支付状态：</label>
                <div class="col-sm-8">
                    <input class="form-control" th:value="${@dict.getLabel('sys_payment_status',sysFnPayment.paymentStatus)}" readonly/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">流程状态：</label>
                <div class="col-sm-8">
                    <input class="form-control" th:value="${@dict.getLabel('process_status',sysFnPayment.processStatus)}" readonly/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="paymentRemark" class="form-control">[[*{paymentRemark}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/payment";
        $("#form-payment-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-payment-edit').serialize());
            }
        }

        $("input[name='paymentTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>